package com.wyu.blog.service;

import com.wyu.blog.dao.CommentLikeMapper;
import com.wyu.blog.entity.CommentLike;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class CommentLikeService {

    @Autowired
    private CommentLikeMapper commentLikeMapper;


    public void deleteLike(HashMap map) {
        commentLikeMapper.deleteLikeById(map);
    }

    public Integer addLike(CommentLike commentLike){
        return commentLikeMapper.insertLike(commentLike);
    }

    public List<CommentLike> findCommentLike(HashMap map){
        return commentLikeMapper.selectCommentLike(map);
    }

    public List<CommentLike> findCommentNotLike(HashMap map){
        return commentLikeMapper.selectCommentNotLike(map);
    }

}
